﻿<%@Import Namespace="System.Text"%>
<!--#include file="isLogin.aspx"-->
<%
REM Last ModifyTime:16:45 2007-3-19
Main()
%>
<script language="vbscript" runat="server">
dim Width,Height,fileName,ImgUploadPath,errdescription
dim returnValue

Sub Main()
	Width=Request.Form("Width")
	Height=Request.Form("Height")
	fileName=Request.Form("fileName")
	fileName=System.Text.RegularExpressions.Regex.UnEscape(fileName)
	
	
	if Width="" or Height="" or fileName="" then
		returnValue=false
	else
		dim mmArt as New WebNote.WebNote()
			ImgUploadPath=mmArt.DirectionPath
			'returnValue=mmArt.ImageResize(fileName,Width,Height,Define_Switch_CanViewAllFiles)
			returnValue=mmArt.ImageResize(fileName,Width,Height,false)
	
			if Not returnValue then	
				errdescription=mmArt.ErrDescription
				returnValue=false
			else
				returnValue=true
			end if
		mmArt=Nothing
	end if
	ServerReturn(returnValue,errdescription)
end Sub

Function ServerReturn(sReturnvalue,errdescription)
	With Response
		.clear()
		.ContentType = "text/xml"
		.Write("<?xml version=""1.0"" encoding=""UTF-8""?>" & vbcrlf)
		.Write("<root>")
		.Write("<returnvalue>" & Lcase(sReturnvalue) & "</returnvalue>")
		.Write("<errordescription>" & errdescription & "</errordescription>")
		.Write("</root>")
		.End
	End With
End Function

</script>
